package com.jt.www.enums.issue;

/**
 * 投保单状态
 */
public enum AppStatusEnum {

    AS_01("01", "初审不通过"),
    AS_02("02", "待复审"),
    AS_03("03", "复审不通过"),
    AS_04("04", "单证待上传"),
    AS_08("08", "待出单"),
    AS_09("09", "出单失败"),
    AS_10("10", "已出单"),
    AS_11("11", "已取消"),
    AS_12("12", "已删除"),
    AS_18("18", "已提交"),
    AS_21("21", "已承保"),
    AS_22("22", "待出单"),
    AS_98("98", "待支付"),
    AS_99("", "其他");
    /**
     * 投保单状态
     */
    private String code;
    /**
     * 描述
     */
    private String desc;

    AppStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AppStatusEnum getEnumByCode(String code) {
        for (AppStatusEnum statusEnum : AppStatusEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum;
            }
        }
        return AS_99;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}


